Skip to content

Conversation

@Pr3roxDLC
Copy link

@Pr3roxDLC Pr3roxDLC commented Jul 17, 2025

Mistral expects a json object for the schema field but was provided a string encoding the json object.
Fixed by telling jackson to treat the string as raw json


Important

Fixes JSON schema handling in JsonSchema by adding @JsonRawValue to treat schema as raw JSON.

  • Behavior:
    • Fixes JSON schema handling in JsonSchema class by adding @JsonRawValue to schema field.
    • Ensures schema is treated as raw JSON, aligning with Mistral's expectations.
  • Annotations:
    • Adds @JsonRawValue to schema field in JsonSchema class.

This description was created by Ellipsis for 79804a0. You can customize this summary. It will automatically update as commits are pushed.

Copy link
Contributor

@ellipsis-dev ellipsis-dev bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Important

Looks good to me! 👍

Reviewed everything up to 79804a0 in 35 seconds. Click for details.
  • Reviewed 28 lines of code in 1 files
  • Skipped 0 files when reviewing.
  • Skipped posting 1 draft comments. View those below.
  • Modify your settings and rules to customize what types of comments Ellipsis leaves. And don't forget to react with 👍 or 👎 to teach Ellipsis.
1. src/main/java/nl/dannyj/mistral/models/completion/tool/JsonSchema.java:64
  • Draft comment:
    Using @JsonRawValue here is a valid fix to emit the JSON schema as raw JSON. Ensure that the content of 'schema' is always valid JSON to avoid runtime serialization issues.
  • Reason this comment was not posted:
    Confidence changes required: 0% <= threshold 50% None

Workflow ID: wflow_yTwGVObjokAgODkg

You can customize Ellipsis by changing your verbosity settings, reacting with 👍 or 👎, replying to comments, or adding code review rules.

@Dannyj1 Dannyj1 merged commit 099214f into Dannyj1:master Jul 27, 2025
2 of 4 checks passed
@Dannyj1
Copy link
Owner

Dannyj1 commented Jul 27, 2025

Thank you for submitting this PR! This was indeed an oversight introduced in version 2.0 that I didn't catch during testing.

Merging this now. I'll publish a new release in the next few days.

Thanks again for your contribution!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants